// pages/record/record.js
Page({
	data: {
		recordList: []
	},

	getRecords() {
		wx.request({
			url: 'http://localhost:8000/scores',
			success: res => {
				this.setData({
					recordList: res.data,
				})
			},
		})
	},

	goDetail(e){
		const id = e.currentTarget.dataset.id;
		wx.navigateTo({
			url: `/pages/exam/exam?sheetId=${id}`,
		})
	},

	onLoad(options) {
		this.getRecords();
	},

})